#!/usr/bin/env python3
"""
脚本名称：ch19_exe.py
功能描述：演示 函数传参
作者：Gavin
创建日期：2022-05-06
版本：1.0
依赖库：无
使用方法： python ch19_exe.py
"""


def cheese_and_crackers(cheese_count, boxes_of_crackers):
    print("You have %d cheeses!" % cheese_count)
    print("You have %d boxes of crackers!" % boxes_of_crackers)
    print("Man that's enough for a party!")
    print("Get a blanket.\n")


print("We can just give the function numbers directly:")
# 参数直接赋数值
cheese_and_crackers(20, 30)

print("OR, we can use variables from our script:")
amount_of_cheese = 10
amount_of_crackers = 50
# 将参数先定义后传递
cheese_and_crackers(amount_of_cheese, amount_of_crackers)

print("We can even do math inside too:")
# 参数传递时直接使用数学计算
cheese_and_crackers(10 + 20, 5 + 6)

print("And we can combine the two, variables and math:")
# 通过数学计算两个变量的值
cheese_and_crackers(amount_of_cheese + 100, amount_of_crackers + 1000)
